import hasRole from './permission/hasRole'
import hasPermi from './permission/hasPermi'

const install = function(Vue) {
  Vue.directive('hasRole', hasRole)
  Vue.directive('hasPermi', hasPermi)
}

if (Window.Vue) {
  Window['hasRole'] = hasRole
  window['hasPermi'] = hasPermi
  // eslint-disable-next-line no-undef
  Vue.use(install())
}

export default install
